package com.xcf.service.business.finance.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.xcf.dao.DaoSupport;
import com.xcf.service.business.finance.PaymentService;
import com.xcf.util.PageData;
@Service
public class PaymentServiceImpl implements PaymentService{
	@Resource
	private DaoSupport dao;
	@Override
	public List<Map> findPayment(PageData pd) throws Exception {
		
		return (List<Map>) dao.findForList("payment.findPayment", pd);
	}
	@Override
	public List<Map> findPaymentDetail(PageData pd) throws Exception {
		// TODO Auto-generated method stub
		return (List<Map>) dao.findForList("payment.findPaymentDetail", pd);
	}
	@Override
	public void editState(PageData pd) throws Exception {
		dao.update("payment.updatePaymentInfo", pd);
		
	}
	@Override
	public void addPaymentRecord(PageData pd) throws Exception {
		dao.save("payment.addPaymentRecord", pd);
		
	}
	@Override
	public void editDetailState(PageData pd) throws Exception {
		dao.update("payment.updatePaymentInfoDetail", pd);
		
	}
	@Override
	public List<Map> findPaymentIncomeDetail(PageData pd) throws Exception {
		// TODO Auto-generated method stub
		return (List<Map>) dao.findForList("payment.findPaymentIncomeDetail", pd);
	}
	@Override
	public List<Map> findInvoiceCodeByBillCode(PageData pd) throws Exception {
		
		return (List<Map>) dao.findForList("payment.findInvoiceByBillCode", pd);
	}
	@Override
	public List<Map> findBillCodeByInvoiceCode(PageData pd) throws Exception {
		// TODO Auto-generated method stub
		return (List<Map>) dao.findForList("payment.findBillCodeByInvoice", pd);
	}
	@Override
	public List<Map> finAmountByCode(PageData pd) throws Exception {
		
		return (List<Map>) dao.findForList("payment.findAmountByCode", pd);
	}
	@Override
	public void updateStateById(PageData pd) throws Exception {
		dao.update("payment.updateStateById", pd);
		
	}
	@Override
	public void updateStateByCode(PageData pd) throws Exception {
		dao.update("payment.updateStateByCode", pd);
		
	}
	@Override
	public PageData findPaymentCostInfoByid(String id) throws Exception {
		
		return (PageData) dao.findForObject("payment.findPaymentCostInfoByid", id);
	}
	@Override
	public List<Map> findPaymentDeatilInfo(String payment_app_code) throws Exception {
		
		return (List<Map>) dao.findForList("payment.findPaymentDeatilInfo", payment_app_code);
	}

}
